export const getColor = (hexColor, a = 1) => {
  let r = 0, g = 0, b = 0;
  if (hexColor.startsWith('#') && hexColor.length === 7) {
    r = parseInt(hexColor.slice(1, 3), 16);
    g = parseInt(hexColor.slice(3, 5), 16);
    b = parseInt(hexColor.slice(5, 7), 16);
  }
  return `rgba(${r}, ${g}, ${b}, ${a})`;
}

